package com.bjut.vendormgrsys.model.repository;

import com.bjut.vendormgrsys.model.domain.CampaignPO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface CampaignRepository extends JpaRepository<CampaignPO, String>, JpaSpecificationExecutor<CampaignPO> {
    CampaignPO findCampaignPOById(String id);

    List<CampaignPO> findAllByStatusNot(String status);

    List<CampaignPO> findAllByCreatorIdOrStatus(String creatorId, String status);

    List<CampaignPO> findAllByCreatorIdNotAndStatus(String creatorId, String status);

    List<CampaignPO> findAllByCreatorId(String creatorId);
}
